<?php
/**
 * @package Tools
 * @subpackage DB check
 */

require_once("../../system.php");

$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('tools');

require($GO_THEME->theme_path.'header.inc');


$db1 = new db();
$db2 = new db();

$db1->query('SHOW TABLES');

while($db1->next_record())
{
	$db2->query("SHOW FIELDS FROM `".$db1->f(0)."`;");
	while($db2->next_record(MYSQL_ASSOC))
	{
		foreach($db2->Record as $key=>$value)
		{
			echo '$tables[\''.$db1->f(0).'\'][\'fields\'][][\''.$key.'\']=\''.$value.'\';<br />';
		}
		echo '<br />';
	}
}


load_basic_controls();
$button = new button($cmdClose, "javascript:document.location='index.php';");
echo $button->get_html();
require($GO_THEME->theme_path.'footer.inc');